package com.vtech.ws.cxf.service;

import com.vtech.ws.commons.FileEntity;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import javax.xml.ws.soap.MTOM;

/**
 * TODO
 * https://www.javatips.net/blog/cxf-file-upload-with-soap-mtom
 * https://www.javatips.net/blog/cxf-mtom-client
 * @author houzhiwei
 * @date 2018 /9/6 21:43
 */
@MTOM(threshold = 1024)
@WebService(name = "SoapFileService", targetNamespace = "http://service.cxf.ws.vtech.com")
public interface SoapFileService {

    /**
     * Upload file.
     *
     * @param fileEntity the file entity
     * @return the string
     */
    @WebMethod
    public String upload(@WebParam(name = "file") FileEntity fileEntity);

    /**
     * Download file.
     *
     * @return the file entity
     */
    @WebMethod
    public FileEntity download();


}
